package com.inctech.controller.navigation;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.inctech.service.ICountVisitorService;

@Controller
@RequestMapping("/report")
public class ReportController {
	@Resource(name = "countVisitorService")
	private ICountVisitorService countService;
	
	@RequestMapping("/count")
	public String queryCount(HttpServletRequest request) {
		int count = countService.getTotalCount();
		request.setAttribute("visitorCount", count);
		return "report/count";
	}
	
	@RequestMapping("/statistic")
	public String statisticFlow() {
		return "report/statistic";
	}
}
